package com.station.client.Distribution;


public class NormalDistribution implements IDistribution             //нормальное распределение
{
    private  int m;
    private  int d;
    private  double rand;

    public NormalDistribution(int m,int d)
    {
        this.m = m;
        this.d = d;
    }

    public double Next()
    {
        rand = 0;
        for (int i = 0; i < 12; i++)
        {
            rand += Math.random();
        }
        return (m + d * (rand - 6));
    }
}
